package com.trdcore.zyzkt.exp;


import com.trdcore.zyzkt.resp.ResultData;
import com.trdcore.zyzkt.resp.ReturnCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ZyzktException extends RuntimeException{

    private String code;
    private String msg;

    @ExceptionHandler(ZyzktException.class)
    @ResponseBody
    public ResultData<String> zyzktException(ZyzktException e){
        System.out.println("########come in zyzktException");
        return ResultData.fail(ReturnCodeEnum.RC999.getCode(),"执行ZyzktException异常处理");
    }
}
